<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <button onclick="toOpen()">开启</button>
    <button onclick="toClose()">关闭</button>
    <script>
        // 打开一个新的标签页  
        // window.open()
        function toOpen(){
            window.open('http://fy.qfedu.com')
        }

        // // 关闭一个标签页 
        // window.close()
        function toClose(){
            window.close() // 关闭当前标签页 
        }
    </script>
</body>
</html>